/**
 * @ClassName LC867
 * @Author ykx
 * @Date 2024/7/7 13:47
 * @Version 1.0
 */
public class LC867 {
    public int[][] transpose(int[][] matrix) {
        int[][] result = new int[matrix[0].length][matrix.length];
        for (int i = 0; i < result.length; i++) {
            for (int j = 0; j < result[i].length; j++) {
                result[i][j] = matrix[j][i];
            }
        }
        return result;
    }
}
